import request from '@/utils/request'

// 获取字典列表
export function getDictList(params) {
  return request({
    url: '/auth/dict/list',
    method: 'get',
    params
  })
};

// 获取字典详情
export function getDict(id) {
  return request({
    url: '/auth/dict/get/' + id,
    method: 'get'   
  })
};

// 保存字典
export function saveDict(data) {
  return request({
    url: '/auth/dict/save',
    method: 'post',
    data
  })
};

// 物理删除字典
export function deleteDict(id) {
  return request({
    url: '/auth/dict/delete/' + id,
    method: 'delete'
  })
};

// 逻辑删除字典
export function deleteByLogic(id) {
  return request({
    url: '/auth/dict/deleteByLogic/' + id,
    method: 'delete'
  })
};

// 批量删除字典
export function deleteByIds(ids) {
  return request({
    url: '/auth/dict/deleteByIds?ids=' + ids,
    method: 'delete'
  })
};